// sweepcircleView.h : interface of the CsweepcircleView class
//


#pragma once
#include "SweepCircleVoronoi.h"

class CsweepcircleView : public CView
{
private:
	CDC *m_pDC;
	HGLRC m_hRC;
	PIXELFORMATDESCRIPTOR m_pfd;
	vector<CSweepCircleVoronoi::Point> sites;
	CSweepCircleVoronoi::Point center;
	float radiusVarying;
	CSweepCircleVoronoi *voronoi;
	float fTimerWorking;

protected: // create from serialization only
	CsweepcircleView();
	DECLARE_DYNCREATE(CsweepcircleView)

// Attributes
public:
	CsweepcircleDoc* GetDocument() const;

// Operations
public:

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	void SetPixelFormatOfCurrentDC();
	void InitLight();
	void SetPosition();
	void DrawMyself();
// Implementation
public:
	virtual ~CsweepcircleView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void OnInitialUpdate();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnActionNext();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnFileNew();
	afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
};

#ifndef _DEBUG  // debug version in sweepcircleView.cpp
inline CsweepcircleDoc* CsweepcircleView::GetDocument() const
   { return reinterpret_cast<CsweepcircleDoc*>(m_pDocument); }
#endif

